<?php

namespace app\common\exception;

use app\common\model\setting\TraceIDSetting;
use app\common\util\Result;
use Exception;

/**
 * 应该被捕获器捕获的异常
 */
class CatchException extends Exception
{
    public function __construct($message, $code, $previous = null)
    {
        if ($code != 0) {
            $message .= "[trace_id:" . TraceIDSetting::instance()->getTraceID() . "]";
        }
        parent::__construct($message, $code, $previous);

    }

}
